home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
299_01
/
crews3.ex
< prev
next >
Wrap
Text File
|
1989-12-28
|
664b
|
33 lines
Example 3. Example of Outputting a MEL descriptor:
Code Fragment:
double pipe_length = 100, diameter = 6;
union melo_param_data data; /* see Example 5. */
char length_units[] = "ft";
char diameter_units[] = "in";
int array_len = 0;
int unknown_flag = 0;
melo_init("pipe"); /* initialize */
/* get data ready to output: */
data.real = pipe_length;
melo_data("length", &data, length_units, array_len,
unknown_flag);
data.real = diameter;
melo_data("diameter", &data, diameter_units,
array_len, unknown_flag);
melo(); /* translates data into string */
Descriptor:
pipe,
length = 100 (ft),
diameter = 6 (in);